package com.zsck.zsgy.ui.guide

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.viewModelScope
import com.zsck.zsgy.base.BaseViewModel
import com.zsck.zsgy.ui.auth.AuthRepo
import com.zsck.zsgy.ui.guide.bean.KeyListBean
import com.zsck.zsgy.ui.guide.bean.VersionListBean

class SplashViewModel :BaseViewModel() {

    private val repo by lazy { AuthRepo(viewModelScope, errorLiveData) }

    val splashViewModel = MutableLiveData<List<VersionListBean>>()
    val splashKeyModel =MutableLiveData<KeyListBean>()
    fun postGetVersion(type:String) {
        var typeMap :HashMap<String,String>?=HashMap()
        typeMap!!.put("type", type)
        repo.postGetVersion(typeMap,splashViewModel)
    }

    /**
     * 值集
     */
    fun keyList(pkPath:String){
        repo.getKeyList(pkPath, splashKeyModel)
    }

}